local t = Def.ActorFrame{
	Def.Banner{
		InitCommand=cmd(scaletoclipped,150,150);
			SetMessageCommand=function(self,params)
			group = params.Text;
			if group then
				self:LoadFromSongGroup(group);
			else
				-- fallback
				self:Load( THEME:GetPathG("Group jacket","fallback") );
			end;
		end;
	};
	
	
	LoadActor(THEME:GetPathG("group jacket", "group underlay")) .. {
		SetCommand=cmd(scaletoclipped,160,160;visible,GAMESTATE:GetSortOrder() == "SortOrder_Group";);
	};	
	
	LoadActor(THEME:GetPathG("group jacket", "genre")) .. {
		SetCommand=cmd(scaletoclipped,150,150;visible,GAMESTATE:GetSortOrder() == "SortOrder_Genre";);
	};		
	
	LoadActor(THEME:GetPathG("group jacket", "ABC")) .. {
		SetCommand=cmd(scaletoclipped,150,150;visible,GAMESTATE:GetSortOrder() == "SortOrder_Title";);
	};	
	
	LoadActor(THEME:GetPathG("group jacket", "BPM")) .. {
		SetCommand=cmd(scaletoclipped,150,150;visible,GAMESTATE:GetSortOrder() == "SortOrder_BPM";);
	};

	LoadActor(THEME:GetPathG("group jacket", "ABC")) .. {
		SetCommand=cmd(scaletoclipped,150,150;visible,GAMESTATE:GetSortOrder() == "SortOrder_Artist";);
	};
	
	LoadActor(THEME:GetPathG("Folder", "overlay")) .. {
		InitCommand=cmd(scaletoclipped,160,160;;);
	};
	
	LoadFont("MusicWheelItem SectionCollapsed")..{
		InitCommand=cmd(y,0;maxwidth,100);
		SetMessageCommand=function(self, params)
		local song = params.Song;
		group = params.Text;
		local so = GAMESTATE:GetSortOrder();
			if so == "SortOrder_Title" then
				self:settext(group);
				self:diffuse(color("#FFFFFF"));
					if group == "Other" then
						self:settext("&?!");
					end;
			else
			self:settext("");
			end;
		end;
	};
	
	LoadFont("MusicWheelItem SectionCollapsed")..{
		InitCommand=cmd(y,0;maxwidth,160;rotationz,45;uppercase,true;);
		SetMessageCommand=function(self, params)
		local song = params.Song;
		group = params.Text;
		local so = GAMESTATE:GetSortOrder();
			if so == "SortOrder_Genre" then
				self:settext(group);
				self:diffuse(color("#FFFFFF"));
			else
			self:settext("");
			end;
		end;
	};		
	
	LoadFont("MusicWheelItem SectionCollapsed")..{
		InitCommand=cmd(y,0;maxwidth,160;rotationz,45;uppercase,true;);
		SetMessageCommand=function(self, params)
		local song = params.Song;
		group = params.Text;
		local so = GAMESTATE:GetSortOrder();
			if so == "SortOrder_BPM" then
				self:settext(group);
				self:diffuse(color("#FFFFFF"));
			else
			self:settext("");
			end;
		end;
	};	
	
	LoadFont("MusicWheelItem SectionCollapsed")..{
		InitCommand=cmd(y,0;maxwidth,100);
		SetMessageCommand=function(self, params)
		local song = params.Song;
		group = params.Text;
		local so = GAMESTATE:GetSortOrder();
			if so == "SortOrder_Artist" then
				self:settext(group);
				self:diffuse(color("#FFFFFF"));
					if group == "Other" then
						self:settext("&?!");
					end;
			else
			self:settext("");
			end;
		end;
	};
	
	LoadFont("MusicWheelItem SectionCollapsed")..{
		InitCommand=cmd(y,62;x,-69;zoom,0.8;maxwidth,140;horizalign,left;);
		SetMessageCommand=function(self, params)
		local song = params.Song;
		group = params.Text;
		local so = GAMESTATE:GetSortOrder();
			if so == "SortOrder_Group" then
				self:settext(group);
				self:diffuse(color("#FFFFFF"));
			else
			self:settext("");
			end;
		end;
	};	
	
	SetCommand=function(self)
		self:GetParent():GetChild("SectionExpanded"):visible(false)
		self:GetParent():GetChild("SectionCollapsed"):visible(false)
	end;
};

return t;
